{% load history_tags %}
{% load basket_tags %}
{% load currency_filters %}
{% load thumbnail %}
{% load i18n %}
{% load staticfiles %}

<ul class="basket-mini-item list-unstyled">
    {% if request.basket.num_lines %}
        {% for line in request.basket.all_lines %}
            <li>
                <div class="row">
                    <div class="col-sm-3">
                        <div class="image_container">
                            {% with image=line.product.primary_image %}
                                {% thumbnail image.original "100x100" upscale=False as thumb %}
                                <a href="{{ line.product.get_absolute_url }}"><img class="thumbnail" src="{{ thumb.url }}" alt="{{ line.product.get_title }}"></a>
                                {% endthumbnail %}
                            {% endwith %}
                        </div>
                    </div>
                    <div class="col-sm-5">
                        <p><strong><a href="{{ line.product.get_absolute_url }}">{{ line.description }}</a></strong></p>
                    </div>
                    <div class="col-sm-1 align-center"><strong>{% trans "Qty" %}</strong> {{ line.quantity }}</div>
                    <div class="col-sm-3 price_color align-right">{{ line.unit_price_excl_tax|currency:request.basket.currency }}</div>
                </div>
            </li>
        {% endfor %}
        <li class="form-group form-actions">
            <p class="align-right">
                {% if request.basket.is_tax_known %}
                    <small>{% trans "Total:" %} {{ request.basket.total_incl_tax|currency:request.basket.currency }}</small> 
                {% else %}
                    <small>{% trans "Total:" %} {{ request.basket.total_excl_tax|currency:request.basket.currency }}</small> 
                {% endif %}
            </p>
            <a href="{% url 'basket:summary' %}" class="btn btn-info btn-sm">{% trans "View basket" %}</a>
            <a href="{% url 'checkout:index' %}" class="btn btn-primary btn-sm pull-right"><i class="icon-shopping-cart"></i> {% trans "Checkout" %}</a>
        </li>
    {% else %}
        <li><p>{% trans "Your basket is empty." %}</p></li>
    {% endif %}
</ul>
